@import '../../style/mixin.scss';

$width: 180px;

@mixin height() {
    height: (random(10) * 5 + 200) + px;
}

.component-card {
    width: $width;
    margin: 0 5px;
    margin-bottom: 10px;
    break-inside: avoid;
    .img {
        width: $width;
        border-radius: 15px;
        border: 1px solid #999;
        cursor: pointer;
    }
    .title {
        font-size: 13px;
        font-weight: 500;
        @include ellipsis(2);
        cursor: pointer;
    }
    .author {
        @include flex-row();
        @include flex-between-center();
        margin-top: 3px;
        .left {
            @include flex-row();
            @include flex-start-center();
            .img {
                width: 20px;
                height: 20px;
                border-radius: 50%;
            }
            .name {
                color: #333;
                margin-left: 5px;
                font-size: 12px;
            }
        }
        .right {
            @include flex-row();
            @include flex-center();
            font-size: 12px;
            span {
                margin-left: 4px;
            }
        }
    }
}

.card-modal {
    .ant-modal-content {
        height: 600px;
        padding: 0;
        .ant-modal-close {
            top: -30px;
            left: -30px;
            color: #333;
            font-size: 14px;
        }
        .ant-modal-close-x {
            font-size: 25px;
        }
        .ant-modal-body {
            @include flex-row();
            height: 100%;
            overflow: hidden;
            border-radius: 8px;
            .img {
                width: 55%;
                height: 100%;
            }
            .right-block {
                position: relative;
                width: 45%;
                height: 100%;
                border-left: 1px solid rgba(171, 148, 148, 0.3);
                .owner {
                    width: 100%;
                    @include flex-row();
                    @include flex-between-center();
                    padding: 20px 20px;
                    position: absolute;
                    top: 0;
                    background: #fff;
                    .left {
                        @include flex-row();
                        @include flex-start-center();
                        .img {
                            width: 30px;
                            height: 30px;
                            border-radius: 50%;
                        }
                        .name {
                            color: #333;
                            margin-left: 5px;
                            font-size: 14px;
                        }
                    }
                }
                .scroll-block {
                    width: 100%;
                    height: 100%;
                    padding: 72px 20px 80px 20px;
                    overflow-y: auto;
                }
                .scroll-block::-webkit-scrollbar {
                    display: none;
                }
                .content {
                    padding-bottom: 15px;
                    border-bottom: 1px solid rgba(171, 148, 148, 0.3);
                    .title {
                        font-size: 15px;
                        font-weight: 500;
                        color: #111;
                        line-height: 1.5;
                    }
                    .time {
                        font-size: 13px;
                        color: #666;
                        margin-top: 5px;
                    }
                }
                .footer {
                    padding: 0 20px;
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    border-top: 1px solid rgba(171, 148, 148, 0.3);
                    background: #fff;
                }
            }
        }
        .ant-modal-footer {
            display: none;
        }
    }
}

